<!DOCTYPE html>
<html lang="en">

<head>
    <title>QSKJ_LOCAL</title>
    <script src="/Public/js/tianditu.api.js"></script>
    <script src="/Public/js/jquery-3.7.1.min.js"></script>
    <script src="/Public/js/utilsForCalRiverPath.js"></script>
    <link rel="stylesheet" href="/Public/css/1.css">
    <script src="/Public/js/dom-to-image.min.js"></script>
    <script src="/Public/js/FileSaver.min.js"></script>
    <style>
        #mapDiv {
            position: absolute;
            top: 0px;
            left: 0px;
            width: 100%;
            height: 100%;
            /* min-height: calc(100vh - 50px); */
        }

        .scaleLine{
            z-index: 450;
            position: absolute;
            top:20px;
            right:20px;
            border: 2px solid #000;
            border-top: none;
            line-height: 1.1;
            padding: 2px 5px 1px;
            font-size: 11px;
        }

        #line{
            width:80px;
        }
    </style>
</head>

<body>
    <div id="mapDiv">
       <div class="scaleLine" id="line"></div>
    </div>
    <script>
        var map = new T.Map("mapDiv")
        var zoom = 9;
        map.centerAndZoom(new T.LngLat(103.0253, 29.9967), zoom);
        map.disableDoubleClickZoom(); //禁用双击地图放大
        //添加比例尺控件        
        var scale = new T.Control.Scale();
        map.addControl(scale);
        var scaleElement = $('.tdt-control-scale')[0];
        if (scaleElement) {
            scaleElement.style.bottom = '320px';
            scaleElement.style.left = '20px';
            scaleElement.style.right = 'auto';
            scaleElement.style.top = 'auto';
        }

    </script>
</body>

</html>